import { App } from "vue";
import Antd from "ant-design-vue";
import "ant-design-vue/dist/antd.css";
import "../style/index.scss";
import filters from "/@/filters/index";
import components from "/@/components/components_use";
import directive from "/@/directives/index";

export default {
  install: (app: App): void => {
    app.use(Antd);

    app.config.globalProperties.$filters = filters;

    Object.values(components).forEach((m: any) => {
      app.component(m.name, m);
    });

    Object.keys(directive).forEach((m) => {
      app.directive(m, directive[m as keyof typeof directive]);
    });
  },
};
